<?php

use yii\helpers\Html;
use yii\grid\GridView;
use yii\web\NotFoundHttpException;

//chỉ user mới có quyền
if(Yii::$app->user->isGuest || Yii::$app->user->identity->acc_type==0)
{
	throw new NotFoundHttpException('The requested page does not exist.');
}
else
{

/* @var $this yii\web\View */
/* @var $searchModel app\models\WorkAccountSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Các tài khoản làm việc của bạn';
//$this->params['breadcrumbs'][] = $this->title;
?>
<div class="work-account-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            //'id',
            'work_acc',
            'work_pass',
            //'ban',
            //'acc_pro_id',
			//'accPro.user.full_name',
			'accPro.project.name',
			'accPro.project.link:URL',
			
        ],
    ]); ?>

</div>
<?php
}
?>
